﻿#ifndef NODEDEMOAPI_H
#define NODEDEMOAPI_H

//#include "nlohmann/json.hpp"
//using json = nlohmann::ordered_json;
#include <string>
#include <vector>
#include <queue>
#include <mutex>
class WsIoInterface
{
public:
	WsIoInterface();

	//void SetNodeDemo(NodeDemo* jm);

public:
	void recvRawData(const std::string & pkg);
	bool isResDataReady();
	std::string getResData();

	void sendResData(uint8_t *res,int len);
	bool isRawDataReady();
	std::string getRawData();

	//std::string GetResponse(std::string request);


	//数据缓冲队列
	std::queue<std::string> recvcache;
	std::queue<std::string> sendcache;
	std::mutex rlock;
	std::mutex slock;

};

#endif // NODEDEMOAPI_H
